package Data;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class DictionaryData {
	static List<String> wordList = new ArrayList<String>();
	/**
	 * checked by andy
	 * @return
	 * @throws IOException
	 */
	public static void getDictionary() throws IOException {
		
		
		// read file
		InputStreamReader fileISR = new InputStreamReader(new FileInputStream("dictionary.txt"));
		BufferedReader fileBR = new BufferedReader(fileISR);
		String word;

		// read word
		while((word = fileBR.readLine()) != null) {
			wordList.add(word);
		}

		
	}
	public static int dictSize()
	{
		return wordList.size();
	}
	public List<String> getWordList()
	{
		return wordList;
	}
}
